<template>
  <div>
      <header>接口</header>
      <div class="content">
          <div class="content_title">接口总览</div>
          <div>
              <el-table :data="interfaceData"  :stripe="true">
                  <el-table-column prop="net" label="网络" align="center">
                    <template slot-scope="scope">
                        <img :src="scope.row.img" alt="">
                        <!-- <img src="@/assets/images/interface1.png" alt=""> -->
                    </template>
                  </el-table-column>
                  <el-table-column prop="state" label="状态">
                    <template slot-scope="scope">
                        <div class="state">
                            <div>
                                <span>运行时间:</span>
                                <span>{{scope.row.runTime}}</span>
                            </div>
                            <div>
                                <span>MAC地址:</span>
                                <span>{{scope.row.MACaddress}}</span>
                            </div>
                            <div>
                                <span>接收:</span>
                                <span>{{scope.row.receive}}</span>
                            </div>
                            <div>
                                <span>发送:</span>
                                <span>{{scope.row.send}}</span>
                            </div>
                            <div>
                                <span>IPv4:</span>
                                <span>{{scope.row.IPv4}}</span>
                            </div>
                            <div>
                                <span>IPv6:</span>
                                <span>{{scope.row.IPv6}}</span>
                            </div>
                        </div>
                    </template>
                  </el-table-column>
                  <el-table-column prop="net" label="网络" align="center">
                    <template>
                        <div>
                            <el-button type="success" size="medium">连接</el-button>
                            <el-button type="warning" size="medium">关闭</el-button>
                            <el-button type="primary" size="medium">修改</el-button>
                            <el-button type="danger" size="medium">删除</el-button>
                        </div>
                    </template>
                  </el-table-column>
              </el-table>
            <el-button type="primary" size="default" style="margin-top:20px">添加新接口...</el-button>
          </div>
      </div>
      <div class="content">
          <div class="content_title">全局网络选项</div>
          <div class="content_box">
              <span>IPv6 ULA 前缀</span>
              <el-input v-model="ULAdata" placeholder="" size="normal" style="width:30%"></el-input>
          </div>
      </div>
      <div class="button_box">
          <el-button type="success" size="default">保存&应用</el-button>
          <el-button type="warning" size="default">保存</el-button>
          <el-button type="primary" size="default">复位</el-button>
      </div>
  </div>
</template>

<script>
export default {
    data(){
        return {
            //接口数据
            interfaceData:[
                {
                    img:'http://localhost:8080/static/img/interface1.61a4629b.png',
                    runTime:'4h 59m 30s',
                    MACaddress:'08:00:27:81:73:D8',
                    receive:"1.48MB(17881数据包)",
                    send:"5.63MB(12051数据包)",
                    IPv4:"192.168.56.5/24",
                    IPv6:"fddcd3a0:de3b:1/60"
                },{
                    img:'',
                    runTime:'4h 59m 30s',
                    MACaddress:'08:00:27:81:73:D8',
                    receive:"1.48MB(17881数据包)",
                    send:"5.63MB(12051数据包)",
                    IPv4:"192.168.56.5/24",
                    IPv6:"fddcd3a0:de3b:1/60"
                }
            ],
            //前缀数据
            ULAdata:"fddc:d3a0:de3b::/48"
        }
    },
    methods:{

    }
}
</script>

<style scoped lang="less">
header{
    margin-top: 20px;
    font-size: 24px;
}
.content{
    box-shadow: 0 0 10px #DEE1E6;
    margin-top: 30px;
    padding: 20px;
    .content_title{
        font-size: 14px;
        margin-left: 5px;
    }
    img{
        display: block;
        height: 30%;
        width:30%;
        margin: auto;
    }
    .state{
        font-size: 12px;
    }
    .content_box{
        display: flex;
        justify-content: center;
        text-align: center;
        span{
            margin-right: 20px;
            position: relative;
            top:8px
        }
    }
}
.button_box{
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
}
</style>